package com.ruoyi.exam.mapper;

import com.ruoyi.exam.domain.ExamPaperQuestionCustomerAnswer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.exam.domain.other.ExamPaperAnswerUpdate;
import com.ruoyi.exam.domain.other.KeyValue;
import com.ruoyi.exam.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 试卷题目答案表 Mapper 接口
 * </p>
 *
 * @author JY
 * @since 2024-02-26
 */
@Mapper
public interface ExamPaperQuestionCustomerAnswerMapper extends BaseMapper<ExamPaperQuestionCustomerAnswer> {

    List<ExamPaperQuestionCustomerAnswer> selectListByPaperAnswerId(Integer id);

    List<ExamPaperQuestionCustomerAnswer> studentPage(QuestionPageStudentRequestVM requestVM);

    int insertList(List<ExamPaperQuestionCustomerAnswer> list);

    Integer selectAllCount();

    List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);

    int updateScore(List<ExamPaperAnswerUpdate> examPaperAnswerUpdates);
}
